﻿<!DOCTYPE html>
<html>
	<meta charset="UTF-8"/>
	<head>
		<script src="draggable.js"></script>
		<script>
			window.onload = function(){
				var f = document.getElementById("father");
				var s = document.getElementById("son");
				
				draggable(s, f, {y:true});
			}
		</script>
	</head>
	<body>
		<div id="father" style="margin:auto; width:600px; height:500px; background:gray">
			<div id="son" style="width: 100px; height:100px; float:right; background:#f40"></div>
		</div>
	</body>
</html>